Repository navigation
Conversation
Complete reachability across cycles before pruning payload visitors and test a recursive graph that reaches Payload through an ancestor.
stephanos
commented
Nov 24, 2026
| # for more info. | ||
| *.pb.go linguist-generated | ||
| *.mock.go linguist-generated | ||
| cmd/proxygenerator/interceptor.go -linguist-generated |
Contributor
Author
There was a problem hiding this comment.
GitHub thinks this is a generated file.
stephanos
commented
Nov 24, 2026
| return res | ||
| } | ||
| // Mark this message as not containing a payload to break cycles. | ||
| memo[fullName] = false |
Contributor
Author
There was a problem hiding this comment.
Bug: This temporary false can become a stale result for another type.
If A visits B and B points back to A, B stays cached as having no payload even after A finds one.
stephanos
commented
Nov 24, 2026
| } | ||
|
|
||
| // If we've walked this type before, return the previous result | ||
| if record, ok := (*records)[typeName]; ok { |
Contributor
Author
There was a problem hiding this comment.
A record is inserted before its getters are fully scanned. A recursive getter can read Matches == false from that unfinished record and get skipped, even if the target type later turns out to contain a payload.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What changed?
Resolve payload reachability through recursive protobuf types before pruning proxy visitors.
Why?
A temporary negative result during a cycle could hide a path to a payload.
How did you test it?
Reproduced the bug with a recursive descriptor.
make checkpassed, andmake testnow runs the nested proxy generator regression.Potential risks
The generator can now include additional visitors for recursive message shapes.